using System;
using System.Threading.Tasks;
using NBModular.Module.WeChat.Application.WeChatService.ViewModels;
using NBModular.Module.WeChat.Domain.WeChat.Models;

namespace NBModular.Module.WeChat.Application.WeChatService
{
    /// <summary>
    /// 微信配置管理服务
    /// </summary>
    public interface IWeChatService
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IResultModel> Query(WeChatQueryModel model);

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IResultModel> Add(WeChatAddModel model);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        Task<IResultModel> Delete(Guid id);

        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IResultModel> Edit(Guid id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IResultModel> Update(WeChatUpdateModel model);

        /// <summary>
        /// 获取GLOBAL_ACCESS_TOKEN
        /// </summary>
        /// <param name="appid"></param>
        /// <returns></returns>
        Task<IResultModel> GetTokenAsync(string appid);
    }
}
